#!/bin/bash

# Script to start/stop spanning tree called from kernel
# To be installed as /sbin/bridge-stp with execute permissions

# Set up a default search path.
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
export PATH

if [ $# -ne 2 ]; then
    echo "Usage: bridge-stp <bridge> {start|stop}"
    exit 1
fi

MSTP_BRIDGES="br0"

bridge=$1
for b in $MSTP_BRIDGES; do
    if [ "$bridge" == "$b" ]; then
        exit 0
    fi
done
exit 1
